<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Common extends Member_Controller {

	/**
	 * Admin controller 
	 */
	 public function __construct(){
	   parent::__construct();
       $this->load->model('common_model');
       
	}
	 
	function index(){	   
        
        //debug($this);
	 	$this->view('dashboard');

	}
	
	function loadjs($module='',$file=''){
		if($file){
			$file = MODULEPATH.$module.'/asset/js/'.$file;
			$this->load->file($file);
		}	
	}
	function loadcss($module='',$file=''){
		if($file){
			$file = MODULEPATH.$module.'/asset/css/'.$file;
			$this->load->file($file);
		}	
	}
	function loadimg($module='',$file=''){
	   echo "ok";
		if($file){		
			$file = MODULEPATH.$module.'/asset/image/'.$file;
			$size = @getimagesize($file);
			$mime = $size['mime'];
			$bin = @file_get_contents($file);
			echo '<img src="data:'.$mime.';base64,'.base64_encode($bin).'"> ';
		}	
	}
    
    function image(){
        $this->load->helper('MY_helper');
        echo loadImage('member','1.png');
    }
	
}

